Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CI] Add static checks in github action and sanitizers for unit tests #2725

Closed
wants to merge 3 commits into from
Closed

Conversation

czm23333
Copy link
Contributor

What problem does this PR solve?

Issue Number: #2570

Problem Summary: Use github action to do some static checks and code security tests on the code in the curve warehouse

What is changed and how it works?

What's Changed: Github action workflow, .bazelrc, ut.sh and util/ut_in_image.sh

How it Works: By adding some jobs in github action workflow, cppcheck and cpplint is now automatically performed on push and pull request, and results are published to action files.

The .bazelrc is changed to add building configs for enabling ASan, MSan and UBSan. Then running ut.sh with "--sanitizer [mode]" will use corresponding config to build curve with sanitizers and run tests (specifically, mode=1 for ASan and mode=2 for MSan and UBSan).

Side effects(Breaking backward compatibility? Performance regression?): Running tests with sanitizers may be ~2x-4x slower.

Check List

  • [Y] Relevant documentation/comments is changed or added
  • [Y] I acknowledge that all my contributions will be made under the project's license

@wu-hanqing wu-hanqing self-requested a review September 4, 2023 01:41
util/ut_in_image.sh Outdated Show resolved Hide resolved
util/ut_in_image.sh Show resolved Hide resolved
.bazelrc Outdated Show resolved Hide resolved
.github/workflows/cppcheck.yml Show resolved Hide resolved
@czm23333
Copy link
Contributor Author

czm23333 commented Sep 8, 2023

cicheck

@czm23333 czm23333 closed this by deleting the head repository Sep 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants